Computer programming refers to the process of writing and testing computer programs. Computer programs are groups of instructions specified in one or more programming languages that describe actions to be performed by a computer or other processor-based device. When a computer program is loaded and executed on computer hardware, the computer will behave in a predetermined manner by following the instructions of the computer program. Accordingly, the computer becomes a specialized machine that performs the tasks prescribed by the instructions.
Subsequent to program specification, testing is performed to determine whether or not the program operates as intended. If testing reveals that a program does not operate as intended, for example, where it yields unexpected results, this is likely due to design defects or bugs. In fact, design defects are almost always present in code of any significant size due to the complexity inherent within. Furthermore, correction of defects may introduce new defects into the software. Accordingly, repeated testing is often required to improve the likelihood of early detection and resolution of defects.
Program testing is performed at various levels including at a user interface (UI) or graphical user interface (GUI) level. The interface is the primary way in which users provide input to and receive output from a program. Among other things, testing of UIs involves developing numerous test cases with which to exercise the interface. These test cases are designed to determine how the application will respond to user interaction. UI testing traditionally required a human tester to interact with a UI (e.g., performing mouse-clicks, keyboard entries . . . ) and verify production of expected results. However, such manual testing is time consuming, tedious and subject to human error. Currently, automated testing is much preferred since it enables repeated testing to be performed quickly and efficiently.
In order to automate testing UIs, the tests need to mimic user input and check positioning, color and other details of forms, buttons, menus, dialog boxes, toolbars, and other UI elements. To enable these tests to perform such action, libraries are developed that interact with the UI in such a way that the application cannot distinguish between real user input and input provided by the user. This usually entails sending keyboard and mouse commands to the application using either window messages or accessibility application programming interfaces (APIs).